﻿<UserControl x:Class="Recipe.Views.IngredientDetailsView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:viewModels="clr-namespace:Recipe.ViewModels"
    xmlns:t="clr-namespace:Infrastructure.Theming;assembly=Infrastructure.Client"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400"
    d:DataContext="{d:DesignInstance d:Type=viewModels:IngredientDetailsViewModel}">
    <UserControl.Resources>
        <!-- The UI designer crashes without a reference to that dictionary. Will be removed by ThemeStyleAdapter when application starts -->
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/Infrastructure.Client;component/Assets/Themes/DefaultTheme.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>
    <Grid Background="White">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <Border t:Theme.Style="{StaticResource TitleBorder}" Grid.ColumnSpan="2">
            <TextBlock t:Theme.Style="{StaticResource TitleText}" Text="{Binding Title}"/>
        </Border>
        <TextBlock Text="{Binding Path=Ingredient.LabelName}" Grid.Row="1"/>
        <TextBlock Text="{Binding Path=Ingredient.Name}" Grid.Row="1" Grid.Column="1"/>
    </Grid>
</UserControl>
